var date_all = new Array(14);

function dateAll() {
    for (i = 0; i < 14; i++) {
        date_all[13 - i] = date(0 - i);
    }
    return date_all;
}

function date(AddDayCount) {
    var dd = new Date();
    dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
    var y = dd.getFullYear();
    var m = dd.getMonth() + 1; //获取当前月份的日期
    var d = dd.getDate();
    // console.log(m + "-" + d);
    return m + "-" + d;

}
dateAll();



function show() {
    var date = new Date(); //日期对象 
    var now = "";
    now = date.getFullYear() + "年"; //读英文就行了 
    now = now + (date.getMonth() + 1) + "月"; //取月的时候取的是当前月-1如果想取当前月+1就可以了 
    now = now + date.getDate() + "日";
    now = now + date.getHours() + "时";
    now = now + date.getMinutes() + "分";
    now = now + date.getSeconds() + "秒";
    document.getElementById("clock").innerHTML = now; //div的html是now这个字符串 
    setTimeout("show()", 1000); //设置过1000毫秒就是1秒，调用show方法 
}